<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge" />
	<title>PointSet test</title>
    <script type="text/javascript" src="../../../../x3dom-include.js"></script>
</head>
<body>
    <div class="group"> 
	    <X3D xmlns="http://www.web3d.org/specifications/x3d-namespace" id="x3d" showStat="false" showLog="false" x="0px" y="0px" width="800px" height="600px" style="border: 1px solid #000; background-color: darkslategray;">
        <Scene>
            <Shape onmouseover="document.getElementById('output').innerHTML=' pnt over';"
                   onmouseout="document.getElementById('output').innerHTML=' pnt out';"
                   onclick="document.getElementById('output').innerHTML=' pnt click';">
                <PointSet>
                    <Coordinate point='0 0 0 2 2 2 3 3 3'></Coordinate>
                    <Color color='1 0 0 1 0 0 1 0 0'></Color>
                </PointSet>
            </Shape>
            <Transform translation='2 0 0'>
                <Shape>
                    <PointSet>
                        <Coordinate point='0 0 0 2 2 2 3 3 3'></Coordinate>
                        <Color color='1 1 0 1 1 0 1 1 0'></Color>
                    </PointSet>
                </Shape>
            </Transform>
            <Viewpoint position='2.5 1.5 9.03553' orientation='0 0 1 0' ></Viewpoint>
        </Scene>
      </X3D>
    </div>


    <script type="text/javascript">
    function setCol()
	{
		var mat = document.getElementsByTagName("Color");
		
		mat[0].setAttribute("color", '0 1 0 1 1 1 0 1 0');
        
        var pnt = document.getElementsByTagName("Coordinate");
        
        pnt[0].setAttribute("point", '0 1 1 2 2 2 3 2 2');
		
		return false;
	}
    </script>
    <p> &nbsp; 
	<input type="button" id="col" value="Change" onclick="setCol();" ></input>
	<div id="output">&nbsp;</div>
	</p>
</body>
</html>
